{% extends "base.html" %} {% block title %}Appointments Management - Quick Care Connect{% endblock %} {% block content %}
Admin Panel

{{ get_current_user().name }}

Management
{% include 'admin/_management_sidebar.html' %}

Appointments Management

Quick filters

Primary appointment states

Use the cards for the most common workflow states.

{% if current_status != 'all' %} Active: {{ current_status|replace('_', ' ')|title }} {% endif %}
Advanced filter
{% set fc = request.args.get('filter_category', '') %} {% if fc == 'status' %} {% set adv_cat_label = 'Status' %} {% elif fc == 'date' %} {% set adv_cat_label = 'Date range' %} {% elif fc == 'email' %} {% set adv_cat_label = 'Email' %} {% elif fc == 'patient' %} {% set adv_cat_label = 'Patient' %} {% elif fc == 'doctor' %} {% set adv_cat_label = 'Doctor' %} {% else %} {% set adv_cat_label = 'Quick (cards)' %} {% endif %}
{% if request.args.get('filter_category') == 'status' %}
{% for s in status_options %} {% endfor %}
{% elif request.args.get('filter_category') == 'date' %} {% elif request.args.get('filter_category') == 'email' %} {% elif request.args.get('filter_category') == 'patient' %} {% elif request.args.get('filter_category') == 'doctor' %} {% else %} {% endif %}
All Appointments ({{ appointments|length }})
{% if appointments %}
{% for appointment in appointments %} {% endfor %}
Patient Doctor Date & Time Type Status Payment Status Amount Actions
{{ appointment.patient.user.name }}
{{ appointment.patient.user.email }}
{{ appointment.doctor.user.name }}
{{ appointment.doctor.specialization }}
{{ appointment.appointment_date.strftime('%B %d, %Y') }}
{{ appointment.appointment_time.strftime('%I:%M %p') }}
{{ appointment.appointment_type.title() }} {% if appointment.status == 'pending' %} Pending {% elif appointment.status == 'cancelled' %} Cancelled {% else %} {{ appointment.status.title() }} {% endif %} {% if appointment.status == 'approved' %} {% if appointment.payment_status == 'pending' %} Payment Pending {% elif appointment.payment_status == 'submitted' %} Under Review {% elif appointment.payment_status == 'approved' %} Payment Approved {% elif appointment.payment_status == 'rejected' %} Payment Rejected {% else %} - {% endif %} {% else %} - {% endif %} PKR {{ "%.0f"|format(appointment.charges) }}
{% if appointment.appointment_type == 'video' %} {% endif %} {% if appointment.status == 'approved' and appointment.payment_status == 'submitted' %} {% endif %}
{% else %}
No appointments found

No appointments match your filters.

{% endif %}
{% endblock %}